#pragma once
class ColorValue
{
public:
	ColorValue(void);
    ColorValue(float r, float g, float b)
    {
        m_r = r;
        m_g = g;
        m_b = b;
    }

    float R()
    {
        return m_r;
    }

    float G()
    {
        return m_g;
    }

    float B()
    {
        return m_b;
    }

	~ColorValue(void);
	ColorValue& operator +=(ColorValue& color);
	ColorValue& operator *=(ColorValue& color);
	ColorValue& operator *=(float rate);
	friend ColorValue operator +(ColorValue& color1, ColorValue& color2);
	friend ColorValue operator *(ColorValue& color1, ColorValue& color2);
	friend ColorValue operator *(float rate, ColorValue& color2);
	friend ColorValue operator *(ColorValue& color1, float rate);


    const static ColorValue Black;
    const static ColorValue White;

protected:
    float m_r, m_g, m_b;
};

ColorValue operator +(ColorValue& color1, ColorValue& color2);
ColorValue operator *(ColorValue& color1, ColorValue& color2);
ColorValue operator *(float rate, ColorValue& color2);
ColorValue operator *(ColorValue& color1, float rate);

